package org.jimmy.tang.designpattern.behavior.memento;

/**
 * @author jimmy
 * 
 */
public class Test {
    public static void main(String[] args) {

        Originator org = new Originator();
        org.setState("In meeting.");

        Caretaker ctk = new Caretaker();
        ctk.setMemento(org.createMemento());

        org.setState("In sleeping");
        org.showState();

        org.setMemento(ctk.getMemento());
        org.showState();
    }

}
